//
//  WebviewDelegate.swift
//  YoruNeko
//
//  Created by Kotori on 2021/6/16.
//

import Foundation
import WebKit


protocol WebViewDelegate {
    func urlChanged()
    func isLoading(loading: Bool)
    func addHistory(title: String, url: String)
    
    func onLoadStart(who webView:WKWebView,navigation: WKNavigation)
    func onLoaded(who webView:WKWebView,navigation: WKNavigation)->Void//加载完成后执行，加载错误也执行
    func onFailed(who webView: WKWebView,failWith navigation: WKNavigation,error: Error)->Void
    func onFaviconChanged(favicon:UIImage?)
    
    func openLinkInNewTab(link:URL)
    func previewImage(index:Int,imageUrls:[ImageInfo])
}
